/*
 *
 * This file is part of the open-source SeetaFace engine, which includes three modules:
 * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification.
 *
 * This file is part of the SeetaFace Detection module, containing codes implementing the
 * face detection method described in the following paper:
 *
 *
 *   Funnel-structured cascade for multi-view face detection with alignment awareness,
 *   Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen.
 *   In Neurocomputing (under review)
 *
 *
 * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group,
 * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China.
 *
 * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan)
 *
 * As an open-source face recognition engine: you can redistribute SeetaFace source codes
 * and/or modify it under the terms of the BSD 2-Clause License.
 *
 * You should have received a copy of the BSD 2-Clause License along with the software.
 * If not, see < https://opensource.org/licenses/BSD-2-Clause>.
 *
 * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems.
 *
 * Note: the above information must be kept whenever or wherever the codes are used.
 *
 */

#ifndef SEETA_COMMON_H_
#define SEETA_COMMON_H_

#include <stdint.h>
#include<stdbool.h>
#include<stdlib.h>
#include<stdio.h>
//#include "cv.h"
//#include "highgui.h"

#ifdef SEETA_EXPORTS
#define SEETA_API __declspec(dllexport)
#else
#define SEETA_API __declspec(dllimport)
#endif

#define DISABLE_COPY_AND_ASSIGN(classname) \
 private: \
  classname(const classname&); \
  classname& operator=(const classname&)

#ifdef USE_OPENMP
#include <omp.h>

#define SEETA_NUM_THREADS 4

#define USGPU 0
#endif

#define nullptr NULL
//const int MAX_NCHANNELS = 3;
//const int MAX_WIDTH = 1000;
//const int MAX_HEIGHT = 1000;
//const int MAX_RECT_NUM = 1000;
//
//const int MAX_ACTIVE = 30000;
#define MAX_NCHANNELS 3
#define MAX_WIDTH 1000
#define MAX_HEIGHT 1000
#define MAX_RECT_NUM 1000
#define MAX_ACTIVE  3000
#define ModelNum 3
//static const int ModelNum = 3;

typedef struct classImageData ImageData;

struct classImageData {
	
	uint8_t* data;
	int32_t width;
	int32_t height;
	int32_t num_channels;
};
void InitImageData(struct classImageData *p);
void SetImageData(struct classImageData *p, int32_t img_width, int32_t img_height, int32_t img_num_channels);
typedef struct Rect {
  int32_t x;
  int32_t y;
  int32_t width;
  int32_t height;
} Rect;
typedef struct Point {
	int32_t x;
	int32_t y;
}Point;

typedef struct FaceInfo {
  Rect bbox;

  double roll;
  double pitch;
  double yaw;

  double score; /**< Larger score should mean higher confidence. */
} FaceInfo;

typedef struct FDHandle
{
	uint8_t* mem;
	int MemeryUsed;
	int MemerySum;
	uint8_t** cuda_mem;
	int cuda_MemUsed;
	int cuda_MemSum;
}FDHandle;




//}  // namespace seeta

#endif  // SEETA_COMMON_H_
